package com.apop.accompany.order;

import cn.hutool.core.bean.BeanUtil;
import com.apop.accompany.auth.entity.User;
import com.apop.accompany.stuff.entity.Stuff;
import com.apop.accompany.stuff.service.StuffService;
import com.apop.accompanyH5.home.service.HospitalService;
import com.apop.accompanyH5.order.domain.OrderDO;
import com.apop.accompanyH5.order.domain.vo.OrderReqVO;
import com.apop.accompanyH5.order.enums.OrderStateEnum;
import com.apop.accompanyH5.order.service.OrderService;
import com.apop.common.model.PageResult;
import com.apop.common.model.Result;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 订单管理-pc端
 * @ClassName OneController
 * @author Jiayi Zheng
 * @date 2021/11/10 15:35
 * @Description: 测试
 * @version V1.0
 */
@RestController
@Slf4j
@RequestMapping("/v3pz/order")
public class OrderController {

    @Resource
    OrderService orderService;

    @ApiOperation("列表查询")
    @GetMapping("/list")
    @ResponseBody
    public Result list(@ApiParam(value = "当前页码") @RequestParam(name = "pageNum")  Integer pageNum,
                       @ApiParam(value = "页面数量") @RequestParam(name = "pageSize") Integer pageSize) {

        Page<OrderDO> page = PageHelper.startPage(pageNum, pageSize);
        orderService.list(null);
        PageResult pageResult = new PageResult(page.getResult(), page.getTotal());
        return Result.success(pageResult);

    }



}
